package Lesson;

import java.util.Scanner;

public class Demo2Substring {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        //输入一个手机号
        System.out.println("请输入：");
        String input = sc.nextLine();

        //获取手机号前三位
        String s1 = input.substring(0,3);

        //获取手机号后四位
        String s2 = input.substring(7);

        System.out.println("手机号为：" + s1 + "****" + s2);

    }
}
